<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>chigraph: lib/core/src/NodeCompiler.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="chigraphDoxygenIcon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">chigraph
   &#160;<span id="projectnumber">master</span>
   </div>
   <div id="projectbrief">Systems programming language written for beginners in LLVM</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('NodeCompiler_8cpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">NodeCompiler.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="NodeCompiler_8hpp.html">chi/NodeCompiler.hpp</a>&quot;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Context_8hpp.html">chi/Context.hpp</a>&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="DataType_8hpp.html">chi/DataType.hpp</a>&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="FunctionCompiler_8hpp.html">chi/FunctionCompiler.hpp</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="LLVMVersion_8hpp.html">chi/LLVMVersion.hpp</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="NodeInstance_8hpp.html">chi/NodeInstance.hpp</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="NodeType_8hpp.html">chi/NodeType.hpp</a>&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Result_8hpp.html">chi/Support/Result.hpp</a>&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;llvm/IR/DIBuilder.h&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;llvm/IR/DebugInfo.h&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;llvm/IR/Function.h&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;llvm/IR/IRBuilder.h&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keyword">namespace </span>fs = boost::filesystem;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacechi.html">chi</a> {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#a60d81f093668468eb14be0e18e319ed5">   22</a></span>&#160;<a class="code" href="structchi_1_1NodeCompiler.html#a60d81f093668468eb14be0e18e319ed5">NodeCompiler::NodeCompiler</a>(<a class="code" href="structchi_1_1FunctionCompiler.html">FunctionCompiler</a>&amp; functionCompiler, <a class="code" href="structchi_1_1NodeInstance.html">NodeInstance</a>&amp; inst)</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    : mCompiler{&amp;functionCompiler}, mNode{&amp;inst} {</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="comment">// alloca the outputs</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    llvm::IRBuilder&lt;&gt; allocBuilder(&amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().allocBlock());</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span> idx = 0ull; idx &lt; <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a5d6678d5a90e6b1adb7dafb868b974b1">type</a>().<a class="code" href="structchi_1_1NodeType.html#aade37588d98e93b19a9a47e16c850684">dataOutputs</a>().size(); ++idx) {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keyword">const</span> <span class="keyword">auto</span>&amp; namedType = <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a5d6678d5a90e6b1adb7dafb868b974b1">type</a>().<a class="code" href="structchi_1_1NodeType.html#aade37588d98e93b19a9a47e16c850684">dataOutputs</a>()[idx];</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <span class="comment">// alloca the outputs</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keyword">auto</span> alloca = allocBuilder.CreateAlloca(namedType.type.llvmType(), <span class="keyword">nullptr</span>,</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;                                                <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a993d848a1b95077007e232d177f58308">stringId</a>() + <span class="stringliteral">&quot;__&quot;</span> + std::to_string(idx));</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="comment">// create debug info for the alloca</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        {</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            <span class="comment">// get type</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;            llvm::DIType* dType = namedType.type.debugType();</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            <span class="comment">// TODO(#63): better names</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            <span class="keyword">auto</span> debugVar =</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().<a class="code" href="structchi_1_1FunctionCompiler.html#afa233d01c21e6204e0bb1a11947198dd">diBuilder</a>().</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;#<span class="keywordflow">if</span> LLVM_VERSION_LESS_EQUAL(3, 7)</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;                createLocalVariable(</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;                    llvm::dwarf::DW_TAG_auto_variable,</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;#<span class="keywordflow">else</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;                createAutoVariable(</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;#endif</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                    <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diFunction(), <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().stringId() + <span class="stringliteral">&quot;__&quot;</span> + std::to_string(idx),</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;#<span class="keywordflow">if</span> LLVM_VERSION_LESS_EQUAL(3, 6)</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                    <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diBuilder().createFile(</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                        fs::path(<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diFunction().getFilename()).filename().<span class="keywordtype">string</span>(),</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                        fs::path(<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diFunction().getFilename()).parent_path().<span class="keywordtype">string</span>()),</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;#<span class="keywordflow">else</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                    <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diFunction()-&gt;getFile(),</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;#endif</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                    1,</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;#<span class="keywordflow">if</span> LLVM_VERSION_LESS_EQUAL(3, 6)</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                    *</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;#endif</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;                    dType);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>()</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                .<a class="code" href="structchi_1_1FunctionCompiler.html#afa233d01c21e6204e0bb1a11947198dd">diBuilder</a>()</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                .insertDeclare(alloca, debugVar,</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;#<span class="keywordflow">if</span> LLVM_VERSION_AT_LEAST(3, 6)</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                               <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diBuilder().createExpression(),</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;#<span class="keywordflow">if</span> LLVM_VERSION_AT_LEAST(3, 7)</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                               llvm::DebugLoc::get(1, 1, <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diFunction()),</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;#endif</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;#endif</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                               &amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().allocBlock())</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">#if LLVM_VERSION_LESS_EQUAL(3, 6)</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                -&gt;setDebugLoc(llvm::DebugLoc::get(1, 1, <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diFunction()))</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                ;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        }</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        mReturnValues.push_back(alloca);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    }</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keyword">auto</span> size = <a class="code" href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">inputExecs</a>();</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="comment">// resize the inputexec specific variables</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    mPureBlocks.resize(size);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    mCodeBlocks.resize(size, <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    mCompiledInputs.resize(size, <span class="keyword">false</span>);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#aa31a7c7955b51e5610b966f81bdc989d">   89</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="structchi_1_1NodeCompiler.html#aa31a7c7955b51e5610b966f81bdc989d">NodeCompiler::pure</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a5d6678d5a90e6b1adb7dafb868b974b1">type</a>().<a class="code" href="structchi_1_1NodeType.html#a0e5eb5e2862761cd67f3ff4761175dd5">pure</a>(); }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#af391b4e8ecebe8859490749bac0425de">   91</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="structchi_1_1NodeCompiler.html#af391b4e8ecebe8859490749bac0425de">NodeCompiler::compile_stage1</a>(<span class="keywordtype">size_t</span> inputExecID) {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    assert(inputExecID &lt; <a class="code" href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">inputExecs</a>() &amp;&amp;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;           <span class="stringliteral">&quot;Cannot compile_stage1 for a inputexec that doesn&#39;t exist&quot;</span>);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="comment">// create the code block</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keyword">auto</span>&amp; <a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a> = mCodeBlocks[inputExecID];</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="comment">// if we&#39;ve already done stage 1 before, then just exit</span></div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a> != <span class="keyword">nullptr</span>) { <span class="keywordflow">return</span>; }</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a> = llvm::BasicBlock::Create(</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <a class="code" href="structchi_1_1NodeCompiler.html#a7b0bd7aecf8cfc98804b31b21066b6d1">context</a>().llvmContext(), <span class="stringliteral">&quot;node_&quot;</span> + <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().stringId() + <span class="stringliteral">&quot;__&quot;</span> + std::to_string(inputExecID),</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        &amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().llFunction());</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="comment">// only do this for non-pure nodes because pure nodes don&#39;t call their dependencies, they are</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="comment">// called by the non-pure</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="structchi_1_1NodeCompiler.html#aa31a7c7955b51e5610b966f81bdc989d">pure</a>()) {</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="comment">// generate code for all the dependent pures</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keyword">auto</span> depPures = <a class="code" href="namespacechi.html#a00be19cc8464681f474ecbcd27abe13c">dependentPuresRecursive</a>(<a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>());</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="comment">// set our vector to be the same length</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keyword">auto</span>&amp; pureBlocks = mPureBlocks[inputExecID];</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        pureBlocks.resize(depPures.size());</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="comment">// create the first pure block--the loop only creates the next one</span></div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordflow">if</span> (!depPures.empty()) {</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            pureBlocks[0] = llvm::BasicBlock::Create(<a class="code" href="structchi_1_1NodeCompiler.html#a7b0bd7aecf8cfc98804b31b21066b6d1">context</a>().llvmContext(),</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                                                     <span class="stringliteral">&quot;node_&quot;</span> + <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().stringId() + <span class="stringliteral">&quot;__&quot;</span> +</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                                                         std::to_string(inputExecID) + <span class="stringliteral">&quot;__&quot;</span> +</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                                                         depPures[0]-&gt;stringId(),</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                                                     &amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().llFunction());</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        }</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keywordtype">id</span> = 0ull; <span class="keywordtype">id</span> &lt; depPures.size(); ++id) {</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <span class="comment">// create a BasicBlock for the next one to br to--if we&#39;re on the last one, use the code</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            <span class="comment">// block</span></div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            llvm::BasicBlock* nextBlock = [&amp;] {</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == depPures.size() - 1) { <span class="keywordflow">return</span> <a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a>; }</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                pureBlocks[<span class="keywordtype">id</span> + 1] = llvm::BasicBlock::Create(</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                    <a class="code" href="structchi_1_1NodeCompiler.html#a7b0bd7aecf8cfc98804b31b21066b6d1">context</a>().llvmContext(),</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                    <span class="stringliteral">&quot;node_&quot;</span> + <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().stringId() + <span class="stringliteral">&quot;__&quot;</span> + std::to_string(inputExecID) + <span class="stringliteral">&quot;__&quot;</span> +</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                        depPures[<span class="keywordtype">id</span> + 1]-&gt;stringId(),</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                    &amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().llFunction());</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                <span class="keywordflow">return</span> pureBlocks[<span class="keywordtype">id</span> + 1];</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            }();</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <span class="comment">// add nextBlock to the list of possible locations for the indirectbr</span></div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().<a class="code" href="structchi_1_1FunctionCompiler.html#a85f29ea79e8fab1c963f096be468a1a5">nodeCompiler</a>(*depPures[<span class="keywordtype">id</span>])-&gt;<a class="code" href="structchi_1_1NodeCompiler.html#a7dc06ad0390f2113fbeb5e7c0cf3dd06">jumpBackInst</a>().addDestination(nextBlock);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;            <span class="comment">// set post-pure break to go to the next one</span></div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;            llvm::IRBuilder&lt;&gt; irBuilder{pureBlocks[id]};</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;            irBuilder.CreateStore(llvm::BlockAddress::get(nextBlock),</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;                                  &amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().postPureBreak());</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            <span class="comment">// br to the pure, terminating that BasicBlock</span></div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;            irBuilder.CreateBr(&amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().nodeCompiler(*depPures[<span class="keywordtype">id</span>])-&gt;<a class="code" href="structchi_1_1NodeCompiler.html#a12c42cfcd23400c523184966ed238806">firstBlock</a>(0));</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        }</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;}</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#ac3f5bd1f1f84fc1b35fc8ad54db3c844">  151</a></span>&#160;<a class="code" href="structchi_1_1Result.html">Result</a> <a class="code" href="structchi_1_1NodeCompiler.html#ac3f5bd1f1f84fc1b35fc8ad54db3c844">NodeCompiler::compile_stage2</a>(std::vector&lt;llvm::BasicBlock*&gt; trailingBlocks,</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                                    <span class="keywordtype">size_t</span>                         inputExecID) {</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    assert((<a class="code" href="structchi_1_1NodeCompiler.html#aa31a7c7955b51e5610b966f81bdc989d">pure</a>() || trailingBlocks.size() == <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#ae15567fb9911109701a9d221b58494db">outputExecConnections</a>.size()) &amp;&amp;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;           <span class="stringliteral">&quot;Trailing blocks is the wrong size&quot;</span>);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    assert(inputExecID &lt; <a class="code" href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">inputExecs</a>());</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keyword">auto</span>&amp; <a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a> = mCodeBlocks[inputExecID];</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="comment">// skip if we&#39;ve already compiled</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structchi_1_1NodeCompiler.html#ab3db1222a66ea1767cd6dbc8a8a10963">compiled</a>(inputExecID)) { <span class="keywordflow">return</span> {}; }</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="comment">// if we haven&#39;t done stage 1, then do it</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a> == <span class="keyword">nullptr</span>) { <a class="code" href="structchi_1_1NodeCompiler.html#af391b4e8ecebe8859490749bac0425de">compile_stage1</a>(inputExecID); }</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    llvm::IRBuilder&lt;&gt; codeBuilder{<a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a>};</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="comment">// inputs and outputs (inputs followed by outputs)</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    std::vector&lt;llvm::Value*&gt; io;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="comment">// add inputs</span></div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span> idx = 0ull; idx &lt; <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a88e73d3556afbb4dd72dd9de7900ad6b">inputDataConnections</a>.size(); ++idx) {</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keyword">auto</span>&amp; connection = <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a88e73d3556afbb4dd72dd9de7900ad6b">inputDataConnections</a>[idx];</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <span class="keyword">auto</span>&amp; remoteNode = *connection.first;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <span class="keyword">auto</span>  remoteID   = connection.second;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        assert(remoteID &lt; <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().nodeCompiler(remoteNode)-&gt;<a class="code" href="structchi_1_1NodeCompiler.html#a4798bbddf994de6c4e3f607991456e09">returnValues</a>().size() &amp;&amp;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;               <span class="stringliteral">&quot;Internal error: connection to a value doesn&#39;t exist&quot;</span>);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keyword">auto</span> loaded = codeBuilder.CreateLoad(</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;            <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().nodeCompiler(remoteNode)-&gt;<a class="code" href="structchi_1_1NodeCompiler.html#a4798bbddf994de6c4e3f607991456e09">returnValues</a>()[remoteID]);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        io.push_back(loaded);</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        assert(io[io.size() - 1]-&gt;getType() == <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a5d6678d5a90e6b1adb7dafb868b974b1">type</a>().<a class="code" href="structchi_1_1NodeType.html#a7d2edfc21ff54a1ff8ad98fffb969268">dataInputs</a>()[idx].type.llvmType() &amp;&amp;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;               <span class="stringliteral">&quot;Internal error: types do not match&quot;</span>);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    }</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="comment">// add outputs</span></div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    std::copy(mReturnValues.begin(), mReturnValues.end(), std::back_inserter(io));</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="comment">// on pure, jump to the set loc</span></div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structchi_1_1NodeCompiler.html#aa31a7c7955b51e5610b966f81bdc989d">pure</a>()) {</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="keyword">auto</span> brBlock = llvm::BasicBlock::Create(<a class="code" href="structchi_1_1NodeCompiler.html#a7b0bd7aecf8cfc98804b31b21066b6d1">context</a>().llvmContext(),</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                                                <span class="stringliteral">&quot;node_&quot;</span> + <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().stringId() + <span class="stringliteral">&quot;_jumpback&quot;</span>,</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;                                                &amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().llFunction());</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        llvm::IRBuilder&lt;&gt; builder(brBlock);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        mJumpBackInst =</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;            builder.CreateIndirectBr(builder.CreateLoad(&amp;<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().postPureBreak()));</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        trailingBlocks.resize(1);</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        trailingBlocks[0] = brBlock;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    }</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="comment">// codegen</span></div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    <a class="code" href="structchi_1_1Result.html">Result</a> res = <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a5d6678d5a90e6b1adb7dafb868b974b1">type</a>().<a class="code" href="structchi_1_1NodeType.html#ac6662ce1a327258cd1f879b63cfbfa06">codegen</a>(</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        *<span class="keyword">this</span>, *<a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a>, inputExecID,</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        llvm::DebugLoc::get(<a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().nodeLineNumber(<a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>()), 1, <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().diFunction()),</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        io, trailingBlocks);</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    mCompiledInputs[inputExecID] = <span class="keyword">true</span>;</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;}</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#a12c42cfcd23400c523184966ed238806">  214</a></span>&#160;llvm::BasicBlock&amp; <a class="code" href="structchi_1_1NodeCompiler.html#a12c42cfcd23400c523184966ed238806">NodeCompiler::firstBlock</a>(<span class="keywordtype">size_t</span> inputExecID)<span class="keyword"> const </span>{</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    assert(inputExecID &lt; <a class="code" href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">inputExecs</a>());</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <span class="keywordflow">if</span> (mPureBlocks[inputExecID].empty()) { <span class="keywordflow">return</span> <a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">codeBlock</a>(inputExecID); }</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <span class="keywordflow">return</span> *mPureBlocks[inputExecID][0];</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;}</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">  221</a></span>&#160;llvm::BasicBlock&amp; <a class="code" href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">NodeCompiler::codeBlock</a>(<span class="keywordtype">size_t</span> inputExecID)<span class="keyword"> const </span>{</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    assert(inputExecID &lt; <a class="code" href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">inputExecs</a>());</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="keywordflow">return</span> *mCodeBlocks[inputExecID];</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;}</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;</div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#a3825379c4840a017b6ab91ec5b42cc6c">  226</a></span>&#160;llvm::Module&amp; <a class="code" href="structchi_1_1NodeCompiler.html#a3825379c4840a017b6ab91ec5b42cc6c">NodeCompiler::llvmModule</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">funcCompiler</a>().<a class="code" href="structchi_1_1FunctionCompiler.html#a3bc147aa1b93c8e8c08c91ade3e13024">llvmModule</a>(); }</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#ab3db1222a66ea1767cd6dbc8a8a10963">  228</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="structchi_1_1NodeCompiler.html#ab3db1222a66ea1767cd6dbc8a8a10963">NodeCompiler::compiled</a>(<span class="keywordtype">size_t</span> inputExecID)<span class="keyword"> const </span>{</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    assert(inputExecID &lt; <a class="code" href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">inputExecs</a>());</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    <span class="keywordflow">return</span> mCompiledInputs[inputExecID];</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;}</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#a7b0bd7aecf8cfc98804b31b21066b6d1">  233</a></span>&#160;<a class="code" href="structchi_1_1Context.html">Context</a>&amp; <a class="code" href="structchi_1_1NodeCompiler.html#a7b0bd7aecf8cfc98804b31b21066b6d1">NodeCompiler::context</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#ac2ada83d65425a80a4af74da5414fd75">context</a>(); }</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">  235</a></span>&#160;<span class="keywordtype">size_t</span> <a class="code" href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">NodeCompiler::inputExecs</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structchi_1_1NodeCompiler.html#aa31a7c7955b51e5610b966f81bdc989d">pure</a>()) {</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().type().qualifiedName() == <span class="stringliteral">&quot;lang:entry&quot;</span>) {</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    }</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">node</a>().<a class="code" href="structchi_1_1NodeInstance.html#a3b1a040d8cd223c288ce42aa85b9420f">inputExecConnections</a>.size();</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;}</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="namespacechi.html#a00be19cc8464681f474ecbcd27abe13c">  244</a></span>&#160;std::vector&lt;NodeInstance*&gt; <a class="code" href="namespacechi.html#a00be19cc8464681f474ecbcd27abe13c">dependentPuresRecursive</a>(<span class="keyword">const</span> <a class="code" href="structchi_1_1NodeInstance.html">NodeInstance</a>&amp; inst) {</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    std::vector&lt;NodeInstance*&gt; ret;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    <span class="comment">// TODO: remove duplicates in some intellegent way</span></div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; conn : inst.<a class="code" href="structchi_1_1NodeInstance.html#a88e73d3556afbb4dd72dd9de7900ad6b">inputDataConnections</a>) {</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="comment">// if it isn&#39;t connected (this really shouldn&#39;t happen because that would fail validation),</span></div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        <span class="comment">// then skip.</span></div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        <span class="keywordflow">if</span> (conn.first == <span class="keyword">nullptr</span>) { <span class="keywordflow">continue</span>; }</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <span class="keywordflow">if</span> (conn.first-&gt;type().pure()) {</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            <span class="keyword">auto</span> deps = <a class="code" href="namespacechi.html#a00be19cc8464681f474ecbcd27abe13c">dependentPuresRecursive</a>(*conn.first);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;            std::copy(deps.begin(), deps.end(), std::back_inserter(ret));</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            ret.push_back(conn.first);</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        }</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    }</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;}</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;}  <span class="comment">// namespace chi</span></div><div class="ttc" id="structchi_1_1NodeCompiler_html_ac3f5bd1f1f84fc1b35fc8ad54db3c844"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#ac3f5bd1f1f84fc1b35fc8ad54db3c844">chi::NodeCompiler::compile_stage2</a></div><div class="ttdeci">Result compile_stage2(std::vector&lt; llvm::BasicBlock *&gt; trailingBlocks, size_t inputExecID)</div><div class="ttdoc">Fill the codegen block If compile_stage1 hasn&amp;#39;t been called for this inputExecID, then it will be cal...</div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00151">NodeCompiler.cpp:151</a></div></div>
<div class="ttc" id="LLVMVersion_8hpp_html"><div class="ttname"><a href="LLVMVersion_8hpp.html">LLVMVersion.hpp</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_ac63b5729c1bdb67a231a1f948ad59374"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#ac63b5729c1bdb67a231a1f948ad59374">chi::NodeCompiler::codeBlock</a></div><div class="ttdeci">llvm::BasicBlock &amp; codeBlock(size_t inputExecID) const</div><div class="ttdoc">Get the code block for a given inputExecID Requires that compile_stage1 has been called for this ID...</div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00221">NodeCompiler.cpp:221</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_a3825379c4840a017b6ab91ec5b42cc6c"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#a3825379c4840a017b6ab91ec5b42cc6c">chi::NodeCompiler::llvmModule</a></div><div class="ttdeci">llvm::Module &amp; llvmModule() const</div><div class="ttdoc">Get the module being generated. </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00226">NodeCompiler.cpp:226</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_aa31a7c7955b51e5610b966f81bdc989d"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#aa31a7c7955b51e5610b966f81bdc989d">chi::NodeCompiler::pure</a></div><div class="ttdeci">bool pure() const</div><div class="ttdoc">node().type().pure() </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00089">NodeCompiler.cpp:89</a></div></div>
<div class="ttc" id="structchi_1_1NodeInstance_html_a3b1a040d8cd223c288ce42aa85b9420f"><div class="ttname"><a href="structchi_1_1NodeInstance.html#a3b1a040d8cd223c288ce42aa85b9420f">chi::NodeInstance::inputExecConnections</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; std::pair&lt; NodeInstance *, size_t &gt; &gt; &gt; inputExecConnections</div><div class="ttdoc">The connections that lead to this node, exec. </div><div class="ttdef"><b>Definition:</b> <a href="NodeInstance_8hpp_source.html#l00074">NodeInstance.hpp:74</a></div></div>
<div class="ttc" id="structchi_1_1FunctionCompiler_html_a85f29ea79e8fab1c963f096be468a1a5"><div class="ttname"><a href="structchi_1_1FunctionCompiler.html#a85f29ea79e8fab1c963f096be468a1a5">chi::FunctionCompiler::nodeCompiler</a></div><div class="ttdeci">NodeCompiler * nodeCompiler(NodeInstance &amp;node)</div><div class="ttdoc">Get a node compile for a certain node. </div><div class="ttdef"><b>Definition:</b> <a href="FunctionCompiler_8cpp_source.html#l00353">FunctionCompiler.cpp:353</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_afd650ba41704bbeca337cbadb18f03cf"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#afd650ba41704bbeca337cbadb18f03cf">chi::NodeCompiler::funcCompiler</a></div><div class="ttdeci">FunctionCompiler &amp; funcCompiler() const</div><div class="ttdoc">Get the function compiler. </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8hpp_source.html#l00042">NodeCompiler.hpp:42</a></div></div>
<div class="ttc" id="structchi_1_1FunctionCompiler_html_a3bc147aa1b93c8e8c08c91ade3e13024"><div class="ttname"><a href="structchi_1_1FunctionCompiler.html#a3bc147aa1b93c8e8c08c91ade3e13024">chi::FunctionCompiler::llvmModule</a></div><div class="ttdeci">llvm::Module &amp; llvmModule() const</div><div class="ttdoc">Get the module being generated. </div><div class="ttdef"><b>Definition:</b> <a href="FunctionCompiler_8hpp_source.html#l00081">FunctionCompiler.hpp:81</a></div></div>
<div class="ttc" id="structchi_1_1NodeInstance_html_a993d848a1b95077007e232d177f58308"><div class="ttname"><a href="structchi_1_1NodeInstance.html#a993d848a1b95077007e232d177f58308">chi::NodeInstance::stringId</a></div><div class="ttdeci">std::string stringId() const</div><div class="ttdoc">Get the ID as a string. </div><div class="ttdef"><b>Definition:</b> <a href="NodeInstance_8hpp_source.html#l00068">NodeInstance.hpp:68</a></div></div>
<div class="ttc" id="Result_8hpp_html"><div class="ttname"><a href="Result_8hpp.html">Result.hpp</a></div><div class="ttdoc">Defines the Result class and related functions. </div></div>
<div class="ttc" id="structchi_1_1NodeType_html_aade37588d98e93b19a9a47e16c850684"><div class="ttname"><a href="structchi_1_1NodeType.html#aade37588d98e93b19a9a47e16c850684">chi::NodeType::dataOutputs</a></div><div class="ttdeci">const std::vector&lt; NamedDataType &gt; &amp; dataOutputs() const</div><div class="ttdoc">Get the data outputs for the node. </div><div class="ttdef"><b>Definition:</b> <a href="NodeType_8hpp_source.html#l00076">NodeType.hpp:76</a></div></div>
<div class="ttc" id="structchi_1_1NodeInstance_html_a5d6678d5a90e6b1adb7dafb868b974b1"><div class="ttname"><a href="structchi_1_1NodeInstance.html#a5d6678d5a90e6b1adb7dafb868b974b1">chi::NodeInstance::type</a></div><div class="ttdeci">NodeType &amp; type()</div><div class="ttdoc">Get the type of the instance. </div><div class="ttdef"><b>Definition:</b> <a href="NodeInstance_8hpp_source.html#l00046">NodeInstance.hpp:46</a></div></div>
<div class="ttc" id="structchi_1_1NodeInstance_html"><div class="ttname"><a href="structchi_1_1NodeInstance.html">chi::NodeInstance</a></div><div class="ttdoc">An instance of a node. </div><div class="ttdef"><b>Definition:</b> <a href="NodeInstance_8hpp_source.html#l00019">NodeInstance.hpp:19</a></div></div>
<div class="ttc" id="structchi_1_1NodeInstance_html_a88e73d3556afbb4dd72dd9de7900ad6b"><div class="ttname"><a href="structchi_1_1NodeInstance.html#a88e73d3556afbb4dd72dd9de7900ad6b">chi::NodeInstance::inputDataConnections</a></div><div class="ttdeci">std::vector&lt; std::pair&lt; NodeInstance *, size_t &gt; &gt; inputDataConnections</div><div class="ttdoc">The connections that go into this node, data. </div><div class="ttdef"><b>Definition:</b> <a href="NodeInstance_8hpp_source.html#l00077">NodeInstance.hpp:77</a></div></div>
<div class="ttc" id="FunctionCompiler_8hpp_html"><div class="ttname"><a href="FunctionCompiler_8hpp.html">FunctionCompiler.hpp</a></div><div class="ttdoc">Defines functions for compiling GraphFunction objects. </div></div>
<div class="ttc" id="namespacechi_html_a00be19cc8464681f474ecbcd27abe13c"><div class="ttname"><a href="namespacechi.html#a00be19cc8464681f474ecbcd27abe13c">chi::dependentPuresRecursive</a></div><div class="ttdeci">std::vector&lt; NodeInstance * &gt; dependentPuresRecursive(const NodeInstance &amp;inst)</div><div class="ttdoc">Get the pures a NodeInstance relies on These are all the dependent pures (it&amp;#39;s fetched recursively) T...</div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00244">NodeCompiler.cpp:244</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_a4599a3322541fe67adfa343c19b00dc4"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#a4599a3322541fe67adfa343c19b00dc4">chi::NodeCompiler::inputExecs</a></div><div class="ttdeci">size_t inputExecs() const</div><div class="ttdoc">The number of input execs that we can compile If it&amp;#39;s pure or an entry node, this is 1...</div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00235">NodeCompiler.cpp:235</a></div></div>
<div class="ttc" id="structchi_1_1Context_html"><div class="ttname"><a href="structchi_1_1Context.html">chi::Context</a></div><div class="ttdoc">The class that handles the loading, creation, storing, and compilation of modules It also stores a LL...</div><div class="ttdef"><b>Definition:</b> <a href="Context_8hpp_source.html#l00055">Context.hpp:55</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_a8a595537ffd4b3116059d59e3fd61f8b"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#a8a595537ffd4b3116059d59e3fd61f8b">chi::NodeCompiler::node</a></div><div class="ttdeci">NodeInstance &amp; node() const</div><div class="ttdoc">The node we&amp;#39;re compiling. </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8hpp_source.html#l00046">NodeCompiler.hpp:46</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_af391b4e8ecebe8859490749bac0425de"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#af391b4e8ecebe8859490749bac0425de">chi::NodeCompiler::compile_stage1</a></div><div class="ttdeci">void compile_stage1(size_t inputExecID)</div><div class="ttdoc">Add the basic blocks and fill the pure blocks, but don&amp;#39;t fill the code block nop if its already been ...</div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00091">NodeCompiler.cpp:91</a></div></div>
<div class="ttc" id="structchi_1_1FunctionCompiler_html"><div class="ttname"><a href="structchi_1_1FunctionCompiler.html">chi::FunctionCompiler</a></div><div class="ttdoc">Class for compiling GraphFunctions into llvm::Functions. </div><div class="ttdef"><b>Definition:</b> <a href="FunctionCompiler_8hpp_source.html#l00024">FunctionCompiler.hpp:24</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_a4798bbddf994de6c4e3f607991456e09"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#a4798bbddf994de6c4e3f607991456e09">chi::NodeCompiler::returnValues</a></div><div class="ttdeci">std::vector&lt; llvm::Value * &gt; returnValues() const</div><div class="ttdoc">Get return values. </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8hpp_source.html#l00105">NodeCompiler.hpp:105</a></div></div>
<div class="ttc" id="structchi_1_1NodeType_html_a0e5eb5e2862761cd67f3ff4761175dd5"><div class="ttname"><a href="structchi_1_1NodeType.html#a0e5eb5e2862761cd67f3ff4761175dd5">chi::NodeType::pure</a></div><div class="ttdeci">bool pure()</div><div class="ttdoc">Get if this node is pure. </div><div class="ttdef"><b>Definition:</b> <a href="NodeType_8hpp_source.html#l00086">NodeType.hpp:86</a></div></div>
<div class="ttc" id="NodeType_8hpp_html"><div class="ttname"><a href="NodeType_8hpp.html">NodeType.hpp</a></div><div class="ttdoc">Defines the NodeType class. </div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_a7b0bd7aecf8cfc98804b31b21066b6d1"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#a7b0bd7aecf8cfc98804b31b21066b6d1">chi::NodeCompiler::context</a></div><div class="ttdeci">Context &amp; context() const</div><div class="ttdoc">Just node().context() </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00233">NodeCompiler.cpp:233</a></div></div>
<div class="ttc" id="DataType_8hpp_html"><div class="ttname"><a href="DataType_8hpp.html">DataType.hpp</a></div><div class="ttdoc">Defines the DataType class. </div></div>
<div class="ttc" id="structchi_1_1NodeInstance_html_ae15567fb9911109701a9d221b58494db"><div class="ttname"><a href="structchi_1_1NodeInstance.html#ae15567fb9911109701a9d221b58494db">chi::NodeInstance::outputExecConnections</a></div><div class="ttdeci">std::vector&lt; std::pair&lt; NodeInstance *, size_t &gt; &gt; outputExecConnections</div><div class="ttdoc">The connections that go out of this node, exec. </div><div class="ttdef"><b>Definition:</b> <a href="NodeInstance_8hpp_source.html#l00080">NodeInstance.hpp:80</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_ab3db1222a66ea1767cd6dbc8a8a10963"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#ab3db1222a66ea1767cd6dbc8a8a10963">chi::NodeCompiler::compiled</a></div><div class="ttdeci">bool compiled(size_t inputExecID) const</div><div class="ttdoc">Get if compile_stage2 has been called for a given inputExecID. </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00228">NodeCompiler.cpp:228</a></div></div>
<div class="ttc" id="structchi_1_1NodeType_html_a7d2edfc21ff54a1ff8ad98fffb969268"><div class="ttname"><a href="structchi_1_1NodeType.html#a7d2edfc21ff54a1ff8ad98fffb969268">chi::NodeType::dataInputs</a></div><div class="ttdeci">const std::vector&lt; NamedDataType &gt; &amp; dataInputs() const</div><div class="ttdoc">Get the data inputs for the node. </div><div class="ttdef"><b>Definition:</b> <a href="NodeType_8hpp_source.html#l00073">NodeType.hpp:73</a></div></div>
<div class="ttc" id="structchi_1_1FunctionCompiler_html_afa233d01c21e6204e0bb1a11947198dd"><div class="ttname"><a href="structchi_1_1FunctionCompiler.html#afa233d01c21e6204e0bb1a11947198dd">chi::FunctionCompiler::diBuilder</a></div><div class="ttdeci">llvm::DIBuilder &amp; diBuilder() const</div><div class="ttdoc">The debug builder we&amp;#39;re using for the module. </div><div class="ttdef"><b>Definition:</b> <a href="FunctionCompiler_8hpp_source.html#l00085">FunctionCompiler.hpp:85</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_a60d81f093668468eb14be0e18e319ed5"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#a60d81f093668468eb14be0e18e319ed5">chi::NodeCompiler::NodeCompiler</a></div><div class="ttdeci">NodeCompiler(FunctionCompiler &amp;functionCompiler, NodeInstance &amp;inst)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00022">NodeCompiler.cpp:22</a></div></div>
<div class="ttc" id="namespacechi_html"><div class="ttname"><a href="namespacechi.html">chi</a></div><div class="ttdoc">The namespace where chigraph lives. </div><div class="ttdef"><b>Definition:</b> <a href="BitcodeParser_8hpp_source.html#l00012">BitcodeParser.hpp:12</a></div></div>
<div class="ttc" id="structchi_1_1NodeInstance_html_ac2ada83d65425a80a4af74da5414fd75"><div class="ttname"><a href="structchi_1_1NodeInstance.html#ac2ada83d65425a80a4af74da5414fd75">chi::NodeInstance::context</a></div><div class="ttdeci">Context &amp; context() const</div><div class="ttdoc">Get the containing Context object. </div><div class="ttdef"><b>Definition:</b> <a href="NodeInstance_8hpp_source.html#l00087">NodeInstance.hpp:87</a></div></div>
<div class="ttc" id="Context_8hpp_html"><div class="ttname"><a href="Context_8hpp.html">Context.hpp</a></div><div class="ttdoc">Defines the Context class and related functions. </div></div>
<div class="ttc" id="structchi_1_1Result_html"><div class="ttname"><a href="structchi_1_1Result.html">chi::Result</a></div><div class="ttdoc">The result object, used for identifiying errors with good diagnostics. </div><div class="ttdef"><b>Definition:</b> <a href="Result_8hpp_source.html#l00072">Result.hpp:72</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_a12c42cfcd23400c523184966ed238806"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#a12c42cfcd23400c523184966ed238806">chi::NodeCompiler::firstBlock</a></div><div class="ttdeci">llvm::BasicBlock &amp; firstBlock(size_t inputExecID) const</div><div class="ttdoc">Get the first block to jump to for the node If there are dependent pures, it&amp;#39;s the first pure block O...</div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8cpp_source.html#l00214">NodeCompiler.cpp:214</a></div></div>
<div class="ttc" id="structchi_1_1NodeCompiler_html_a7dc06ad0390f2113fbeb5e7c0cf3dd06"><div class="ttname"><a href="structchi_1_1NodeCompiler.html#a7dc06ad0390f2113fbeb5e7c0cf3dd06">chi::NodeCompiler::jumpBackInst</a></div><div class="ttdeci">llvm::IndirectBrInst &amp; jumpBackInst() const</div><div class="ttdoc">Get the IndirectBrInst* for the pure. </div><div class="ttdef"><b>Definition:</b> <a href="NodeCompiler_8hpp_source.html#l00110">NodeCompiler.hpp:110</a></div></div>
<div class="ttc" id="NodeInstance_8hpp_html"><div class="ttname"><a href="NodeInstance_8hpp.html">NodeInstance.hpp</a></div><div class="ttdoc">Defines the NodeInstance class and related functions. </div></div>
<div class="ttc" id="NodeCompiler_8hpp_html"><div class="ttname"><a href="NodeCompiler_8hpp.html">NodeCompiler.hpp</a></div></div>
<div class="ttc" id="structchi_1_1NodeType_html_ac6662ce1a327258cd1f879b63cfbfa06"><div class="ttname"><a href="structchi_1_1NodeType.html#ac6662ce1a327258cd1f879b63cfbfa06">chi::NodeType::codegen</a></div><div class="ttdeci">virtual Result codegen(NodeCompiler &amp;compiler, llvm::BasicBlock &amp;codegenInto, size_t execInputID, const llvm::DebugLoc &amp;nodeLocation, const std::vector&lt; llvm::Value *&gt; &amp;io, const std::vector&lt; llvm::BasicBlock *&gt; &amp;outputBlocks)=0</div><div class="ttdoc">A virtual function that is called when this node needs to be called. </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_a2d5e495f4b604d04f57d90095a59dd6.html">core</a></li><li class="navelem"><a class="el" href="dir_4c9f1e14e2f6af37c0cac7b6ff4842b3.html">src</a></li><li class="navelem"><b>NodeCompiler.cpp</b></li>
    <li class="footer">Generated on Sat Sep 16 2017 17:41:35 for chigraph by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
